<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <button id="btn">按钮</button>
    <script>
      //   function fn() {
      //     console.log(this)
      //   }

      //   //   fn() // ==> this --> window
      //   //   fn.apply({ name: 'zs' }) // ==> this --> {name:'zs'}
      //   fn.apply(undefined) // ==> this --> {name:'zs'} // 注意: apply调用函数,入股传入undefined,其实就相当于没传第一个参数.所以this会指向window

      const btn = document.getElementById('btn')
      btn.onclick = function (e) {


        console.log(e)
        func.apply(undefined, [合成事件])
      }
    </script>
  </body>
</html>
